﻿@{
    Layout = "~/Views/Shared/_BaseLayout.cshtml";
}
@using MiniWeb.Core.Dtos
@model List<ShopCartProductInfo>
<script type="text/javascript" src="/templates/speciality/js/cart.js"></script>
<script type="text/javascript" src="/scripts/ui/js/ligerBuild.min.js"></script>
<link href="/templates/speciality/css/shop.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(document).ready(function () {
        //购买数量+-
        $(".reduce").click(function () {
            var count = $(".final_k").val();
            if (count == "1") {
                return;
            }
            $(".final_k").val(parseInt(count) - 1);
        });
        $(".add").click(function () {
            var count = $(".final_k").val();
            $(".final_k").val(parseInt(count) + 1);
        });
    });
    </script>

<div class="sub-box">
    <div class="area">
        <div class="sub-current">
            <a href="/index.aspx">网站首页</a>&nbsp;&gt;&nbsp;<a href="/shopping/cart">购物车</a></div>
        <div class="container progress-box">
            <!-- 内容主体 -->
            <div class="progress-step clear">
                <ul>
                    <li class="step"><b></b>1：我的购物车</li>
                    <li class=""><b></b>2：确认订单信息</li>
                    <li><b></b>3：成功提交订单</li>
                </ul>
            </div>
            <div class="progress-tip">
                <label>
                    我的购物车</label>
                <p class="tip2">
                    <strong>温馨提示：</strong>"注册订购"有利于用户在网上查询订单进度；</p>
            </div>
            <div class="checkout s-login">
                <table class="table-shop" cellpadding="0" cellspacing="0" border="0">
                    <tbody>
                        <tr>
                            <td class="name first" colspan="3">
                                商品名称
                            </td>
                            <td>
                                单价
                            </td>
                            <td width="72">
                                数量
                            </td>
                            <td>
                                商品合计
                            </td>
                            <td>
                                操作
                            </td>
                        </tr>
                        @foreach (var item in Model)
                        {
                            <tr>
                                <td class="checkbox first">
                                    <input name="cart_id" value="88" type="checkbox">
                                </td>
                                <td class="name" colspan="2">
                                    <div class="group">
                                        <a class="img" target="_blank" href="/goods/show?pid=@item.ProductID">
                                            <img src="@item.ProductImg" height="56"></a>
                                        <p>
                                            <a target="_blank" href="/goods/show?pid=@item.ID">@item.ProductName &nbsp; </a>
                                        </p>
                                    </div>
                                </td>
                                <td>
                                    ￥@item.Price
                                </td>
                                <td class="u-number">
                                    <div class="number">
                                        <s class="add" title="加一" onclick="CartComputNum(this,'/', '@item.ID', 1);"></s>
                                        <input type="text" name="goods_quantity" class="input" style="width: 30px; text-align: center;
                                            ime-mode: Disabled;" value="@item.Num" onblur="CartAmountTotal(this, '/', '88');" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))">
                                        <s class="reduce" title="减一" onclick="CartComputNum(this, '/', '@item.ID', -1);"></s>
                                    </div>
                                </td>
                                <td>
                                    <b>￥@item.TotalRMB</b>
                                </td>
                                <td class="function">
                                    <a class="delete" onclick="DeleteCart(this,'/','88');" href="javascript:;">删除</a>
                                </td>
                            </tr>
                        }
                        <tr>
                            <td colspan="8" class="last">
                                商品件数：@Model.Sum(c=>c.Num) 件 &nbsp;&nbsp; 商品总金额（不含运费）：<font color="#FF0000" size="2">￥@(Model.Sum(c => c.TotalRMB))</font>元
                                &nbsp;&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td class="first">
                               
                            </td>
                            <td class="name select">
                                @*<label for="chkAll">
                            全选</label><a href="javascript:;" onclick="DeleteSelectCart('/')">批量删除</a><a onclick="DeleteCart(this,'/','0');">清空购物车</a>*@
                            </td>
                            <td colspan="6" class="last">
                                <p class="settle-btn">
                                    商品总价：<b>￥@(Model.Sum(c => c.TotalRMB))</b>元 <a class="btn btn-success marL10" href="/shopping/confirm">
                                        马上去结算</a>
                                </p>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
